<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
	dir="ltr">
	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>"
			type="text/css" />

	</head>
	<body style="">
		<div class="head_content" id="headBar" style=""></div>
		<div class="main_content" id="main">
			<form method="post"		action="mb_attr_save.html" 			class="tableform">
				<div class="division">
					<table id="attr_table" border="0" cellpadding="0" cellspacing="0"
						width="100%">
						<tbody>
							<tr>
								<th>
									注册项名称:
								</th>
								<td>
									<input value="${memberAttr.attrName }" class="x-input " name="memberAttr.attrName" type="text"/>
									<input value="${memberAttr.attrId}"  name="memberAttr.attrId" type="hidden"/>	
								</td>
							</tr>
							<tr>
								<th>
									是否必填:
								</th>
								<td>
									<input name="memberAttr.attrRequired"  <c:if test="${not empty memberAttr.attrId and memberAttr.attrRequired }">checked="checked"</c:if>  value="true"  type="radio"/>
									<input name="memberAttr.attrRequired"  <c:if test="${empty memberAttr.attrId or !memberAttr.attrRequired }">checked="checked"</c:if>  value="false"  type="radio"/>
									
								</td>
							</tr>
							<tr>
								<th>
									是否显示:
								</th>
								<td>
									<input name="memberAttr.showOn"  <c:if test="${not empty memberAttr.attrId and memberAttr.showOn}">checked="checked"</c:if>  value="true"  type="radio"/>
									<input name="memberAttr.showOn"  <c:if test="${empty memberAttr.attrId or !memberAttr.showOn}">checked="checked"</c:if>  value="false"  type="radio"/>
								</td>
							</tr>
							<tr>
								<th>
									类型:
								</th>
								<td>
									输入内容项
									<input   name="memberAttr.attrTyname"	  type="hidden"  value="输入内容项" />
									<input   name="memberAttr.attrType" type="hidden"  value="text"/>
									<input   name="memberAttr.attrGroup" type="hidden"  value="管理员添加"/>
									
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="table-action">
					<button type="submit" class="btn">
						<span><span>保存</span>
						</span>
					</button>
				</div>
			</form>
		</div>
		<div class="foot_content" id="footBar" style="font-size: 0px;"></div>
		<script type="text/javascript"
			src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>
		<script type="text/javascript"
			src="<c:url value='/scripts/jquery.validate.js'/>"></script>
		<script type="text/javascript">
	$(document).ready(function() {
		// validate signup form on keyup and submit
			var validator = $("#mb_level_form").validate( {
				errorElement : "div",
				errorClass : "x-vali-error",
				onfocusout : false,
				rules : {
					'memberAttr.attrName' : "required" 
				},
				messages : {
					'memberAttr.attrName' : "必填字段" 
				},
				errorPlacement : function(error, element) {
					element.removeClass('x-vali-error');
					error.appendTo(element.parent());

				},
				success : function(div) {
					$(div).remove();
				}
			});
		});
</script>
	</body>
</html>